package com.yang.design.create.factory.simpleFactory;

/**
 * 具体工厂
 */
public class Factory {
    public static AbstractGoods getInstance(String type){
        AbstractGoods goods = null;
        if ("A".equals(type)){
            goods = new GoodsA();
        }else if ("B".equals(type)){
            goods = new GoodsB();
        }

        return goods;
    }
}
